import { Form, Input, Modal } from 'antd';
import React from 'react';

const ContactModal: React.FC<HomeAPI.ContactModalProps> = ({ open, setOpen }) => {
  // const intl = useIntl();
  const [clientForm] = Form.useForm<HomeAPI.clientInfo>();
  const handleOk = async () => {
    setOpen(false);
  };

  return (
    <Modal
      mask={true}
      maskClosable={false}
      title={'联系我们'}
      open={open}
      onOk={() => {
        handleOk();
      }}
      onCancel={() => {
        handleOk();
      }}
    >
      <Form name={'clientForm'} form={clientForm} autoComplete={'off'}>
        <Form.Item
          label={'您的手机'}
          name={'phone'}
          rules={[{ required: true, message: '请输入您的手机号' }]}
        >
          <Input />
        </Form.Item>
        <Form.Item label={'您的邮箱'} name={'email'}>
          <Input />
        </Form.Item>
        <Form.Item label={'您的名字'} name={'name'}>
          <Input />
        </Form.Item>
      </Form>
    </Modal>
  );
};

export default ContactModal;
